package com.ark.cloud.java.persistence.service.impl;


import com.ark.cloud.java.persistence.entity.AircraftStatus;
import com.ark.cloud.java.persistence.mapper.AircraftStatusMapper;
import com.ark.cloud.java.persistence.service.AircraftStatusService;
import com.ark.cloud.java.persistence.utils.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author fukun
 * @create 2021/9/2  下午4:53
 * @description   * 飞机状态变化事件

 */
@Service
public class AircraftStatusServiceImpl implements AircraftStatusService {

    @Autowired
    AircraftStatusMapper aircraftStatusDao;


    @Override
    public void saveAircraftStatusInfo(AircraftStatus aircraftStatus) {
        // 设置UUID
        aircraftStatus.setId(UUIDUtil.next());
        System.out.println("aircraftStatus:"+aircraftStatus);
        aircraftStatusDao.insert(aircraftStatus);
    }
}
